﻿@using System.ComponentModel.DataAnnotations

<EnumRadioGroup TEnum="Fruits" @bind-Value="_radioValue" Disabled="_disabled"></EnumRadioGroup>
<br />
<EnumRadioGroup TEnum="Fruits" @bind-Value="_radioValue" Disabled="_disabled" ButtonStyle="RadioButtonStyle.Solid"></EnumRadioGroup>
<br />
Value: @_radioValue

<div style="margin-top: 20px">
    <Button Type="primary" OnClick="_=>_disabled=!_disabled">Toggle Disabled</Button>
</div>

@code {
    Fruits _radioValue = Fruits.Apple;
    bool _disabled;

    enum Fruits
    {
        [Display(Name = "🍎 Apple")]
        Apple,

        Pear,

        Orange
    }
}